<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
        <title>Document</title>
        <script>
            /* 
                传统字符串：所有单引号，双引号括起来的都叫做字符串。
                ECMA6字符串：反引号   ``

                    1、ECMA6字符串，想怎么写怎么写，换行，代码缩进，都能在字符串中体现出来
                    2、${变量/表达式/函数调用}
                    
            */


            /* var str = "hello \
            world"; */


            var str = `hello 
            world`;
            alert(str);


            function showSelf({name, age, sex = "男"}){
            //    alert("我叫" + name + "，今年" + age + ",是一位" + sex + "性");
                alert(`我叫${name},今年${Math.max(age, 20, 30)}岁,是一位${sex}性`);

            }

            showSelf({
                age: 18,
                name: "小明",
                sex: "女"
            }) 


        </script>
    </head>
    <body>
        
    </body>
</html>